<template>
  <div>
    御剑乘风来,除魔天地间!---我是爸爸 <br>
   
    {{ msg }}

    <button @click="handle">操控爷爷的say</button>
    <hr>
    
    <SonCom></SonCom>
  </div>
</template>
<script>
import SonCom from './SonCom.vue'
export default {
  name: 'FatherCom',
  components: {
    SonCom
  },
  inject:['msg','say'],
  data () {
    return {

    }
  },
  created () {
  },
  computed: {
  },
  methods: {
    handle(){
      //调用爷爷的say函数
      this.say('爷爷你可真大方,爱死你了')
    }
  }
}
</script>
<style lang='less'  scoped>
</style>
